<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>hello</title>
    <style>
        /* 全局样式设置 */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f4f4f9;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            margin: 0;
            color: #333;
        }

        /* 标题样式 */
        h2 {
            font-size: 2.5em;
            color: #2c3e50;
            margin-bottom: 1.5em;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        /* 按钮容器样式 */
        .button-container {
            display: flex;
            gap: 1.5em;
            margin-bottom: 2em;
        }

        /* 按钮样式 */
        button {
            padding: 0.8em 1.8em;
            font-size: 1em;
            border: none;
            border-radius: 5px;
            background-color: #3498db;
            color: white;
            cursor: pointer;
            transition: background-color 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        /* 按钮悬停效果 */
        button:hover {
            background-color: #2980b9;
        }

        /* 表单样式 */
        form {
            display: flex;
            align-items: center;
            gap: 1em;
        }

        /* 提交按钮样式 */
        input[type="submit"] {
            padding: 0.8em 1.8em;
            font-size: 1em;
            border: none;
            border-radius: 5px;
            background-color: #e74c3c;
            color: white;
            cursor: pointer;
            transition: background-color 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        /* 提交按钮悬停效果 */
        input[type="submit"]:hover {
            background-color: #c0392b;
        }
    </style>
</head>

<body>
<h2>hello springBoot</h2>
<div class="button-container">
    <button id="boss" onclick="sub()">boss</button>
    <button id="consumer" onclick="sub2()">consumer</button>
</div>
<form action="/security/logout" method="post">
    <input type="submit" value="退出">
    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
</form>
<script>
    function sub() {
        window.location.href = "/security/boss";
    }

    function sub2() {
        window.location.href = "/security/consumer";
    }
</script>
</body>

</html>